package com.authine.cloudpivot.ext.enums;
/**
 * 短信方法
 * author pyf
 */
public enum SMSTemplateCodeEnum {

    RUZHU_SUCCESSS(1, "SMS_151773056"),
    RUZHU_FEEDBACK(2, "SMS_151773051"),
    BAOJIA_NOTIFY(3, "SMS_123799980"),
    FANKUI_NOTIFY(4, "SMS_133960061"),
    ORDER_NOTIFY(5, "SMS_125015041"),
    
    HUODONG_AUTH_CODE(6, "SMS_61765043"),
    ALTER_PASSWORD_AUTH_CODE(7, "SMS_61765042"),
    LOGIN_AUTH_CODE(8, "SMS_61765046"),
    REGISTER_AUTH_CODE(9, "SMS_61765044"),
    IDENTIFY_AUTH_CODE(10, "SMS_61765048"),
    SMS_TEST(11, "SMS_61765047"),
    INFO_ALTER_AUTH_CODE(12, "SMS_61765041"),
    EXCEPTION_AUTH_CODE(13, "SMS_61765045");

    public Integer id;
    public String text;

    SMSTemplateCodeEnum(Integer id, String text) {

        this.id = id;
        this.text = text;
    }

    public static com.authine.cloudpivot.ext.enums.SMSTemplateCodeEnum get(Object code) {
        if (code == null) {
            return null;
        }

        for ( SMSTemplateCodeEnum c :  SMSTemplateCodeEnum.values()) {
            if (String.valueOf(code).equals(String.valueOf(c.id))) {
                return c;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return text;
    }
}